package com.xdtech.trans.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.trans.model.TransAccount;
import com.xdtech.trans.model.TransAccountTrade;
import com.xdtech.trans.vo.TransAccountTradeItem;
import com.xdtech.web.model.ResultMessage;

/**
 * 
 * @author max.zheng
 * @create 2015-06-07 14:39:35
 * @since 1.0
 * @see
 */
public interface TransAccountTradeService extends IBaseService<TransAccountTrade>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-06-07 14:39:35
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdateTransAccountTrade(TransAccountTradeItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-06-07 14:39:35
	 * @modified by
	 * @param newId
	 * @return
	 */
	TransAccountTradeItem loadTransAccountTradeItem(Long transAccountTradeId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-06-07 14:39:35
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deleteTransAccountTradeInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-06-07 14:39:35
	 * @modified by
	 * @param transAccountTradeIds
	 */
	boolean deleteTransAccountTradeInfo(List<Long> transAccountTradeIds);
	
	/**
	 * 加载vo列表条目
	 * @author max.zheng
	 * @create 2015-06-07 14:39:35
	 * @modified by
	 * @return
	 */
	List<TransAccountTradeItem> loadItems();

	/**
	 * 资金入账
	 * @author max.zheng
	 * @create 2015-6-7下午6:49:58
	 * @modified by
	 * @param item
	 * @return
	 */
	ResultMessage inTransAccount(TransAccountTradeItem item);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-6-7下午8:45:34
	 * @modified by
	 * @param item
	 * @return
	 */
	ResultMessage outTransAccount(TransAccountTradeItem item);

	/**
	 * 创建寄件交易金额
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-6-12 下午5:11:47
	 * @param payTransAccount
	 * @param d
	 */
	void createSendTradeRecord(TransAccount payTransAccount, double d,String operator,String tradeOrderNo);

	/**
	 * 
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-7-6 上午10:12:15
	 * @param transAccount
	 * @param money
	 * @param string
	 * @param operator
	 */
	void createTransTradeRecord(TransAccount transAccount, double money, String string, String operator,String tradeOrderNo,boolean isCalculate);
}
